
const thetime = document.querySelector(".thetime")
thetime.innerHTML=gettime();
setInterval(()=>{
    console.log(222);
    thetime.innerHTML=gettime()
},1000)


// let officeHours = 9;

let toDayRegister = 0 //今日登记
let yesterdayRegister = 0//昨日登记
let AllRegister = 0;//总登记量
let orderCompletion = 0;//订单完成








function gettime(){
    let now = new Date();
    let year = now.getFullYear();
    let month = ('0' + (now.getMonth() + 1)).slice(-2);
    let day = ('0' + now.getDate()).slice(-2);
    let hours = ('0' + now.getHours()).slice(-2);
    let minutes = ('0' + now.getMinutes()).slice(-2);
    let seconds = ('0' + now.getSeconds()).slice(-2);
    let formattedTime = `当前时间:${year}-${month}-${day}  ${hours}:${minutes}:${seconds}`
    return formattedTime
}



console.log(formattedTime);
